<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>布控记录查询</title>
    <#include "/common/resource.ftl">
    <script type="text/javascript">
        var getSearchParams = function(){
            return {
            	name:$("input[name='name']").val() || "",
            };
        }
    </script>
</head>
<body class="bg-gray">

   <div class="ui-operation">
       <div class="ui-buttons">
   		 <div class="layui-btn-group tools">
            <button class="layui-btn layui-btn-normal open-dialog" p="url:'${params.contextPath}/view/icip/carmonitor/carmonitor_edit.htm',title:'车辆布控申请',width:'800px',height:'95%'">
				<i class="fa fa-plus"></i>申请布控
			</button>
			<button class="layui-btn layui-btn-normal open-dialog" p="url:'${params.contextPath}/view/icip/carmonitor/carmonitor_edit.htm',title:'编辑车辆布控申请',width:'800px',height:'95%'">
				<i class="fa fa-pencil"></i>编辑并申请
			</button>
			<button class="layui-btn layui-btn-normal remove-button" reurl="${params.contextPath}/web/reportTemplate/delete.json">
				<i class="fa fa-stop"></i>撤控
			</button>
			<button class="layui-btn layui-btn-normal  stop-button" reurl="${params.contextPath}/web/reportTemplate/stop.json">
				<i class="fa fa-play"></i>激活
			</button>
			
         </div>   
         <button class="layui-btn layui-btn-danger open-dialog" p="url:'${params.contextPath}/view/icip/instruction/instruction_publish.htm',title:'发布指令',width:'90%',height:'95%'">
				<i class="fa fa-bell"></i> 所有预警记录(<font id="alarmNum" style="font-weight: bold;">293</font>)
			</button>
         <div class="ui-searchs">
             <div class="value" style="">
             
                 <input type="text" name="name" placeholder="指令标题、关键字">
             </div>
             <input type="button" value="搜索" class="layui-btn layui-btn-danger search-button"/>
         </div>
       </div>
   </div>
   <div class="ui-content" style="padding-left: 10px;padding-right:10px;">
       <table id="datagrid" options="url:'${params.contextPath}/web/reportTemplate/list.json',params:'getSearchParams',dblClickRow:'showDetail'">
			<thead>
               	<tr>
               	   <th data-options="field:'name2',width:80,formatter:formatState">布控状态</th>
               	   <th data-options="field:'name3',width:100">布控编号</th>
               	   <th data-options="field:'name4',width:60">车牌号</th>
                   <th data-options="field:'name',width:180">车辆特征</th>
                   <th data-options="field:'name33',width:60">车主姓名</th>
                   <th data-options="field:'name22',width:100">车主身份证号码</th>
                   <th data-options="field:'name223',width:120">布控周期</th>
                   <th data-options="field:'name2233',width:60">申请人</th>
                   <th data-options="field:'name33233',width:100">申请单位</th>
                   <th data-options="field:'name33d233',width:100">申请时间</th>
                   <th data-options="field:'stateStr',width:150,formatter:formatStatistic">布控统计</th>
                   
				</tr>
			</thead>
       </table>
   </div>
   
</body>
<script type="text/javascript">

$(function(){
	
	
	
	 
    
});

function formatState(val, row){
    if (row.state == 1) {
        return '<span class="ui-accept">' + val + '</span>';
    } else if(row.state == 2){
    	return '<span class="ui-stop">' + val + '</span>';
    }
    return val;
}
function formatStatistic(val, row){
    
    return '<span class="ui-accept">预警记录[10]</span>&nbsp;<span class="ui-accept">审批记录[2]</span>';
    
}
function showDetail (index, row) {
    var url = "${params.contextPath}/view/icip/carmonitor/carmonitor_template_detail.htm?id=" + row.id;
    DialogManager.openDialog("url:'" + url + "',title:'车辆布控详情',width:'800px',height:'90%'");
};
</script>
</html>
